package mn.idax.exchange.otc.mapper;

import mn.idax.exchange.otc.entity.Country;
import mn.idax.exchange.otc.entity.CountryExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Author: jack_huang
 * @Date: 2019/7/1 15:33
 */
public interface CountryMapper {
    long countByExample(CountryExample example);

    int deleteByExample(CountryExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Country record);

    int insertSelective(Country record);

    List<Country> selectByExample(CountryExample example);

    Country selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Country record, @Param("example") CountryExample example);

    int updateByExample(@Param("record") Country record, @Param("example") CountryExample example);

    int updateByPrimaryKeySelective(Country record);

    int updateByPrimaryKey(Country record);

    /**
     * 获取所有的国家
     * @return
     */
    List<Map<String, String>> getAllCountry(@Param("language") String language);

    /**
     * 查看该国家代号是否存在
     * @param id
     * @return
     */
    Integer getCountByCountryId(@Param("id") Integer id);
}